package com.ruandi.test13;

public class Employee {
    //属性
    private String num;
    private String name;
    private int age;
    private int salary;

    //构造参数
    public Employee() {
    }
    public Employee(String num, String name, int age, int salary) {
        super();
        this.num = num;
        this.name = name;
        this.age = age;
        this.salary = salary;
    }

    //getter and setter
    public String getNum() {
        return num;
    }
    public void setNum(String num) {
        this.num = num;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
    public int getSalary() {
        return salary;
    }
    public void setSalary(int salary) {
        this.salary = salary;
    }

    //方法
    public void getInfo(){
        System.out.println("编号："+getNum()+"，姓名："+getName()+"，年龄："+getAge()+"，薪资："+getSalary());
    }
}
